[IA64] SMP_HOST: Alloc vhpt from domheap
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 27 Feb 2006 20:16:16 +0000 (13:16 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 27 Feb 2006 20:16:16 +0000 (13:16 -0700)
It's more reasonable to alloc vhpt from domheap, instead of xenheap.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
xen/arch/ia64/xen/vhpt.c

index 1cf305f0a16da00eca0b4f53c773dfb5766db330..62b272d849421f1cd79d6cab0e75222409dd890e 100644 (file)
@@ -121,7 +121,8 @@ void vhpt_multiple_insert(unsigned long vaddr, unsigned long pte, unsigned long
 
 void vhpt_init(void)
 {
-       unsigned long vhpt_total_size, vhpt_alignment, vhpt_imva;
+       unsigned long vhpt_total_size, vhpt_alignment;
+       struct page_info *page;
 #if !VHPT_ENABLED
        return;
 #endif
@@ -134,12 +135,13 @@ void vhpt_init(void)
         * from domain heap when each domain is created. Assume xen buddy
         * allocator can provide natural aligned page by order?
         */
-       vhpt_imva = alloc_xenheap_pages(VHPT_SIZE_LOG2 - PAGE_SHIFT);
-       if (!vhpt_imva) {
+//     vhpt_imva = alloc_xenheap_pages(VHPT_SIZE_LOG2 - PAGE_SHIFT);
+       page = alloc_domheap_pages(NULL, VHPT_SIZE_LOG2 - PAGE_SHIFT, 0);
+       if (!page) {
                printf("vhpt_init: can't allocate VHPT!\n");
                while(1);
        }
-       vhpt_paddr = __pa(vhpt_imva);
+       vhpt_paddr = page_to_maddr(page);
        vhpt_pend = vhpt_paddr + vhpt_total_size - 1;
        printf("vhpt_init: vhpt paddr=%p, end=%p\n",vhpt_paddr,vhpt_pend);
        vhpt_pte = pte_val(pfn_pte(vhpt_paddr >> PAGE_SHIFT, PAGE_KERNEL));